package com.webapps.tvprogram.data.local;

import java.util.Date;

import android.graphics.Bitmap;

public class ProgramItem implements Comparable<ProgramItem> {
    private String name;
    private Date startTime;
    private int length;
    private String type;
    private String description;
    private Bitmap thumbnail;

    public ProgramItem(String name, Date startTime) {
        this.name = name;
        this.startTime = startTime;
    }

    @Override
    public int compareTo(ProgramItem another) {
        if (startTime.before(another.getStartTime())) {
            return -1;
        } else if (startTime.after(another.getStartTime())) {
            return 1;
        } else {
            return 0;
        }
    }

    public Date getStartTime() {
        return startTime;
    }

    public int getLength() {
        return length;
    }

    public void setLength(int length) {
        this.length = length;
    }

    public String getName() {
        return name;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

}
